﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcStudy.Controllers
{
    public class ErrorController : Controller
    {
        public ActionResult Index(string error)
        {
            ViewBag.Title = "网站内部错误";
            ViewBag.Message = error;
            return View();
        }

        public ActionResult HttpError_404(string error)
        {
            ViewBag.Title = "HTTP 404- 无法找到文件";
            ViewBag.Message = error;
            return View("Index");
        }

        public ActionResult HttpError_500(string error)
        {
            ViewBag.Title = "HTTP 500 - 内部服务器错误";
            ViewBag.Message = error;
            return View("Index");
        }

        public ActionResult General(string error)
        {
            ViewBag.Title = "HTTP 发生错误";
            ViewBag.Message = error;
            return View("Index");
        }
    }
}
